package com.jinghao.tws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.tws.service.IWvProcessMergeConfigService;
import com.jinghao.tws.entity.WvAutoVedioConfig;
import com.jinghao.tws.entity.WvProcessMergeConfig;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/tws/WvProcessMergeConfig")
public class WvProcessMergeConfigController extends JingHaoBaseController<WvProcessMergeConfig> {
	//==================定制内容开始======================
//在这里修改代码
	/**
	 * 根据流程查询需要合并视频 的环节信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/listWvProcessMergeConfig",method = RequestMethod.GET) 
	public Map<String, Object> listWvProcessMergeConfig(@ModelAttribute("model") WvProcessMergeConfig model){
		this.getWvProcessMergeConfigService().listWvProcessMergeConfig(model);
        return model.getSingleJson();   
	} 
	/**
	 * 根据流程查询需要合并视频 的环节信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/addWvProcessMergeConfig",method = RequestMethod.POST) 
	public Map<String, Object> addWvProcessMergeConfig(@ModelAttribute("model") WvProcessMergeConfig model){
		this.getWvProcessMergeConfigService().addWvProcessMergeConfig(model);
        return model.getJson();   
	} 
	//==================定制内容结束======================

	@Autowired
	public void setWvProcessMergeConfigService(IWvProcessMergeConfigService wvProcessMergeConfigService) {
		super.setIJingHaoBaseService(wvProcessMergeConfigService);
	}

	public IWvProcessMergeConfigService getWvProcessMergeConfigService() {
		return (IWvProcessMergeConfigService) super.getIJingHaoBaseService();
	}
}
